package com.qding.park.adapter.ark.adapter.enums;

/**
 * @ClassName LockEventEnum
 * @Description TODO(锁车事件)
 * @author LeiYang
 * @Date 2017年5月15日 上午10:31:35
 * @version 1.0.0
 */
public enum LockEventEnum {

    CARLOCK("锁车", "01"),
    CANCEL("取消", "02");

    /** 枚举值 */
    private String value;
    /** 描述 */
    private String desc;

    private LockEventEnum(String desc, String value) {
        this.value = value;
        this.desc = desc;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static LockEventEnum getEnum(String value) {
        LockEventEnum resultEnum = null;
        LockEventEnum[] enumAry = LockEventEnum.values();
        for (int i = 0; i < enumAry.length; i++) {
            if (enumAry[i].getValue().equals(value)) {
                resultEnum = enumAry[i];
                break;
            }
        }
        return resultEnum;
    }

}
